﻿

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;


public class BLL_tbl_raw_material
{
    public BLL_tbl_raw_material()
    {

    }

    public List<tbl_raw_material> select(String RAW_MATERIAL_ID)
    {
        DAL_tbl_raw_material dal = new DAL_tbl_raw_material();
        return dal.select(RAW_MATERIAL_ID);
    }

    public List<tbl_raw_material> selectAll()
    {
        DAL_tbl_raw_material dal = new DAL_tbl_raw_material();
        return dal.selectAll();
    }

    public bool insert(tbl_raw_material tbl)
    {
        DAL_tbl_raw_material dal = new DAL_tbl_raw_material();
        int i = 0;
        i = dal.insert(
            tbl.RAW_MATERIAL
, tbl.IS_ACTIVE
, tbl.CREATED_BY
, tbl.CREATED_DATE
        );

        return Convert.ToBoolean(i);
    }


    public bool update(tbl_raw_material tbl)
    {
        DAL_tbl_raw_material dal = new DAL_tbl_raw_material();
        int i = 0;
        i = dal.update(
            tbl.RAW_MATERIAL_ID
, tbl.RAW_MATERIAL
, tbl.IS_ACTIVE
, tbl.UPDATED_BY
, tbl.UPDATED_DATE
            );

        return Convert.ToBoolean(i);
    }


    public bool delete(tbl_raw_material tbl)
    {
        DAL_tbl_raw_material dal = new DAL_tbl_raw_material();
        int i = 0;
        i = dal.delete(
                tbl.RAW_MATERIAL_ID
        );

        return Convert.ToBoolean(i);
    }


}

